<!DOCTYPE html>
<html lang="en">

<head>
    <title></title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="./vue2.js"></script>
</head>

<body>
    <div id="app">
        <f-a></f-a>
    </div>
    <script>
        Vue.component("fA", {
            template: '<div> {{msg }} <button @click="changeMsg">点击</button> </div>',
            data() {
                return {
                    msg: "hello  world"
                }
            },
            methods: {
                changeMsg() {
                    this.msg = "itcast";
                }
            }
        });
        var vm = new Vue({
            el: '#app',
            data: {

            }
        })
    </script>
</body>

</html>